/*
day85
2019.11.21
*/

struct TreeNode {
	int val;
	struct TreeNode *left;
	struct TreeNode *right;
}; 


class Solution {
public:
    int countNodes(TreeNode* root) 
	{
        if(!root) return 0;
        int left=0,right=0;
        
        if(root->left) left=countNodes(root->left);
        
        if(root->right) right=countNodes(root->right);
        
        return 1+left+right;
        
    }
};


int main()
{
	return 0;
}
